CREATE TABLE [agency].[AgentBalance]
(
[AgentBalanceId] [int] NOT NULL IDENTITY(1, 1),
[AgentId] [int] NULL,
[Balance] [decimal] (18, 0) NULL,
[ReminderBalance] [decimal] (18, 0) NULL,
[DefaultRecharge] [decimal] (18, 0) NULL,
[BookingCredit] [decimal] (18, 0) NULL,
[Active] [bit] NOT NULL,
[Deleted] [bit] NOT NULL,
[CreatedBy] [int] NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[ModifiedBy] [int] NULL,
[ModifiedOn] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [agency].[AgentBalance] ADD CONSTRAINT [PK_AgentBalance] PRIMARY KEY CLUSTERED  ([AgentBalanceId]) ON [PRIMARY]
GO
ALTER TABLE [agency].[AgentBalance] ADD CONSTRAINT [FK_AgentBalance_Agent] FOREIGN KEY ([AgentId]) REFERENCES [agency].[Agent] ([AgentId])
GO
